<!DOCTYPE html>
<html>
<head>
    <meta charset="utf-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <title>员工管理</title>
    <#include "/common/link.ftl">

</head>
<body class="hold-transition skin-black sidebar-mini">
<div class="wrapper">
    <#include "/common/navbar.ftl">
    <!--菜单回显-->
    <#assign currentMenu="checking"/>
    <#include "/common/menu.ftl">
    <div class="content-wrapper">
        <section class="content-header">
            <h1>员工编辑</h1>
        </section>
        <section class="content">
            <div class="box">
                <form class="form-horizontal" action="/checking/saveOrUpdate" method="post" id="editForm" >
                    <input type="hidden" name="id"  value="${currentChecking.id}">
                    <div class="form-group" style="margin-top: 10px;">
                        <label class="col-sm-2 control-label">姓名：</label>
                        <div class="col-sm-6">
                            <input  type="text" class="form-control" value="${currentChecking.name}" name="name" id="name"  placeholder="请输入姓名">
                        </div>
                    </div>
                    <div class="form-group" style="margin-top: 10px;">
                        <label class="col-sm-2 control-label">考勤日期：</label>
                        <div class="col-sm-6">
                            <input type="text" class="form-control" value="${(currentChecking.time?string("yyyy-MM-dd HH:mm:ss"))!}" id="time" name="time"  placeholder="请输入考勤日期">
                        </div>
                    </div>


                    <div class="form-group">
                        <label for="dept" class="col-sm-2 control-label">记录类型：</label>
                        <div class="col-sm-6">
                            <select class="form-control" id="type" name="type.id">
                                <option value="">全部</option>
                                <#list type as tmp>
                                    <option value="${tmp.id}">${tmp.status}</option>
                                </#list>
                            </select>
                            <script>
                                $("#dept").val(${currentChecking.dept.id})
                            </script>
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="dept" class="col-sm-2 control-label">部门：</label>
                        <div class="col-sm-6">
                            <select class="form-control" id="dept" name="dept.id">
                                <option value="">全部</option>
                                <#list departments as tmp>
                                    <option value="${tmp.id}">${tmp.name}</option>
                                </#list>
                            </select>
                            <script>
                                $("#dept").val(${currentChecking.dept.id})
                            </script>
                        </div>
                    </div>

                    <div class="form-group">
                        <div class="col-sm-offset-1 col-sm-6">
                            <button type="submit" class="btn btn-primary btn-submit btnsave">保存</button>
                            <a href="javascript:window.history.back()" class="btn btn-danger">取消</a>
                        </div>
                    </div>

                </form>

            </div>
        </section>
    </div>
    <#include "/common/footer.ftl">
</div>
</body>
<script>
    $('#time').datetimepicker({
        format:'yyyy-mm-dd HH:mm:ss', //格式
        language:'zh-CN', //中文
        autoclose: true,//选择后自动关闭
        //showMeridian:true, //是否显示上下午
        minView:0,//精确到哪位
    });
</script>
</html>
